package com.teach.food.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.teach.food.entity.FoodGoods;
import com.teach.food.service.FoodGoodsService;
@Controller
@RequestMapping("/food/foodgoods")
public class GoodsController {
	@Autowired
	private FoodGoodsService service;
	
	@GetMapping("/get.do")
	public String doget(Integer foodGoodsId,Model model) {
		FoodGoods goods = service.get(foodGoodsId);
		model.addAttribute("f", goods);
		return "/food/goodsupdate";
	}
}
